home *** CD-ROM | disk | FTP | other *** search
- Path: stern.fokus.gmd.de!news
- From: Watson <sayegh@fokus.gmd.de>
- Newsgroups: comp.lang.c
- Subject: Re: fopen() with a UNIX path?
- Date: Thu, 04 Jan 1996 14:19:36 +0100
- Organization: GMD FOKUS - Research Institute for Open Communication Systems
- Message-ID: <30EBD3E8.3D2F@fokus.gmd.de>
- References: <4cflfs$1m@acmez.gatech.edu>
- NNTP-Posting-Host: pollux.fokus.gmd.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b4 (X11; I; SunOS 5.4 sun4m)
-
- David Ward wrote:
- >
- > Hey everyone. Does anyone know why something like this doesn't work?
- >
- > main()
- > {
- > FILE *in;
- >
- > if ( in = fopen ("~/.friends", "r")) == NULL )
-
- The character '~' is only interpreted by a shell and will
- be - hopefully - expanded to your home directory. A C compiler
- won't do that.
- --
- * Greetinx,
- Watson (sayegh@fokus.gmd.de)
- more personal details at:
- http://www.fokus.gmd.de/ovma/employees/sayegh/entry.html
-